﻿using OpcSelfHost.WebApi;
using Microsoft.Owin.Hosting;
using System;

namespace OpcSelfHost.WebApi
{
    public class WebServer
    {
        static IDisposable server = null;
        public static void Start(int port)
        {
            string baseAddress = string.Format("http://{0}:{1}/","*", port);
            server = WebApp.Start<Startup>(url: baseAddress);
        }
        public static void Close()
        {
            System.Environment.Exit(0);
        }
    }
}
